<?php
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 */
$db['deliverynote_line']=array (
  'columns' =>
  array (  
    'id' =>
    array (
      'type' => 'int(10)',
      'required' => true,
      'pkey' => true,
      'extra' => 'auto_increment',
      'editable' => false,
      'label' => 'ID',
      'comment' => app::get('wms')->_('ID'),
    ),
    'delivery_bn' =>
    array (
      'type' => 'varchar(32)',
      'required' => true,
      'label' => '发货单号',
      'comment' => '配送流水号',
      'editable' => false,
      'width' =>140,
      'searchtype' => 'has',
      'filtertype' => 'yes',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
      'is_title' => true,
      'prefix' => 'unique',
    ),
    'delivery_id' =>
    array (
      'type' => 'table:delivery@wms',
      'required' => true,
      'default' => 0,
      'editable' => false,
    ),
    'deliverytype' =>
    array (
      'type' =>
      array (
        'deliver' => '送货上门',
        'pickup' => '自提',
        'auto' => '送货上门', //-自动审单',
        'batch' => '送货上门', //-批量审单',
        'single' => '送货上门', //-单条审单',
      ),
      'default' => 'deliver',
      'required' => true,
      'label' => '送货方式',
      'width' => 70,
      'editable' => false,
      'filtertype' => 'yes',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => false,
    ),
    'carno' =>
    array (
      'type' => 'text',
      'label' => '车牌号',
      'comment' => '车牌号',
      'editable' => false,
      'width' =>140,
      'searchtype' => 'has',
      'filtertype' => 'yes',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
      'is_title' => true,
    ),
    'bnsContent' =>
    array(
        'type' => 'text',
        'required' => true,
        'label' => '订单内容',
        'comment' => '订单内容',
        'editable' => false,
        'in_list' => false,
        'default' => '',
    ),
    'logi_id' =>
    array (
      'type' => 'table:dly_corp@ome',
      'comment' => '物流公司ID',
      'editable' => false,
      'label' => '物流公司',
      'filtertype' => 'normal',
      'filterdefault' => true,
    ),
    'logi_name' =>
    array (
      'type' => 'varchar(100)',
      'label' => '物流公司',
      'comment' => '物流公司名称',
      'editable' => false,
      'width' =>75,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'logi_no' =>
    array (
      'type' => 'varchar(100)',
      'label' => '快递单号',
      'comment' => '快递单号',
      'editable' => false,
      'width' =>75,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'shop_id' =>
    array (
      'type' => 'table:shop@ome',
      'label' => '来源店铺',
      'width' => 75,
      'editable' => false,
      'in_list' => true,
      'filtertype' => 'normal',
    ),
    'shop_name' =>
    array (
      'type' => 'varchar(100)',
      'label' => '来源店铺',
      'comment' => '来源店铺名称',
      'editable' => false,
      'width' =>75,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'ax_name' =>
    array (
      'type' => 'varchar(100)',
      'label' => 'AX客户编码',
      'comment' => 'AX客户编码',
      'editable' => false,
      'width' =>75,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'shortname' =>
    array (
      'type' => 'varchar(100)',
      'label' => '客户简称',
      'comment' => '客户简称',
      'editable' => false,
      'width' =>75,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'ax_shopname' =>
    array (
      'type' => 'varchar(100)',
      'label' => '客户名称',
      'comment' => '客户名称',
      'editable' => false,
      'width' =>75,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'axshipno' =>
    array (
      'type' => 'varchar(100)',
      'label' => 'AX送货单号',
      'comment' => 'AX送货单号',
      'editable' => false,
      'width' =>140,
      'searchtype' => 'has',
      'filtertype' => 'yes',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
      'is_title' => true,
    ),
    'msg' =>
    array (
      'type' => 'text',
      'label' => '消息',
      'comment' => '消息',
      'editable' => false,
      'width' =>140,
      'searchtype' => 'has',
      'filtertype' => 'yes',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
      'is_title' => true,
    ),    
    'axorderno' =>
    array (
      'type' => 'varchar(100)',
      'label' => 'AX订单号',
      'comment' => 'AX订单号',
      'editable' => false,
      'width' =>140,
      'searchtype' => 'has',
      'filtertype' => 'yes',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
      'is_title' => true,
    ),
      'status' =>
          array (
              'type' =>
                  array (
                      'unconfirmed' => '新建',
                      'confirmed' => '已确认',
                  ),
              'default' => 'unconfirmed',
              'required' => true,
              'label' => '状态',
              'width' => 70,
              'editable' => false,
              'filtertype' => 'yes',
              'filterdefault' => true,
              'in_list' => true,
              'default_in_list' => false,
          ),
    'deliverynote_id' =>
    array (
      'type' => 'table:deliverynote@wms',
      'required' => true,
      'default' => 0,
      'editable' => false,
    ),
    'remark' =>
    array (
      'type' => 'varchar(200)',
      'editable' => false,
      'in_list' => true,
      'default_in_list' =>true,
      'label' => '备注',
      'searchtype' =>'has',
      'comment' => app::get('wms')->_('备注'),
    ),
    'last_modify' =>
    array (
      'type' => 'last_modify',
      'comment' => '修改时间',
      'label' => '修改时间',
      'in_list' => true,
      'default_in_list' =>true,
    ),
  ),
  'index' =>
     array (
         'ind_id' =>
         array (
             'columns' =>
             array (
                 0 => 'id',
             ),
         ),
         'ind_delivery_bn' =>
         array (
             'columns' =>
             array (
                 0 => 'delivery_bn',
             ),
         ),
         'ind_delivery_id' =>
         array (
             'columns' =>
             array (
                 0 => 'delivery_id',
             ),
         ),
      'inx_c_delivery_id_deliverynote_id' =>
          array(
              'columns' =>
                  array(
                      0 => 'delivery_id',
                      1 => 'deliverynote_id',
                  ),
          ),
         'ind_deliverynote_id' =>
         array (
             'columns' =>
             array (
                 0 => 'deliverynote_id',
             ),
         ),
   ),
  'comment' => app::get('wms')->_('OMS送货行'),
);
